# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 0
n 0(None)[return False
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7647c4c>}
nname: 107
n 107(None)[return True
]:
	i: 51(), 94()
	o: 

nname: 94
n 94(None)[louie_send('rebound_down', sender=self.player)
]:
	i: 67&83(t), 90()
	o: 107()

nname: 90
n 90(None)[]:
	i: 67&83(f)
	o: 94()

nname: 67&83
n 67&83(val < 0 and 'rebound_up')[]:
	i: 0(f)
	o: 90(f), 94(t)

nname: 51
n 51(None)[louie_send('event_down', sender=self.player)
]:
	i: 24&40(t), 47()
	o: 107()

nname: 47
n 47(None)[]:
	i: 24&40(f)
	o: 51()

nname: 24&40
n 24&40(val < 0 and 'event_up')[]:
	i: 0(t)
	o: 47(f), 51(t)

nname: 0
n 0(ret)[ret = self.player.select(val)
]:
	i: 
	o: 24&40(t), 67&83(f)

nname: 107
n 107(None)[return True
]:
	i: 24&40(), 67&83()
	o: 

nname: 67&83
n 67&83(None)[if not(val < 0 and 'rebound_up'):
	pass
louie_send('rebound_down', sender=self.player)
]:
	i: 0(f)
	o: 107()

nname: 24&40
n 24&40(None)[if not(val < 0 and 'event_up'):
	pass
louie_send('event_down', sender=self.player)
]:
	i: 0(t)
	o: 107()

nname: 0
n 0(ret)[ret = self.player.select(val)
]:
	i: 
	o: 24&40(t), 67&83(f)

nname: 0
n 0(None)[ret = self.player.select(val)
if ret:
	if not(val < 0 and 'event_up'):
		pass
	louie_send('event_down', sender=self.player)
else:
	if not(val < 0 and 'rebound_up'):
		pass
	louie_send('rebound_down', sender=self.player)
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb764d46c>}
nname: 0
n 0(None)[return self._move(-event.arg['count'])
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7647f4c>}
nname: 0
n 0(None)[return self._move(event.arg['count'])
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7647e0c>}
nname: 0
n 0(None)[return self._move(-event.arg['count'] ** 2)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7647fcc>}
nname: 0
n 0(None)[return self._move(event.arg['count'] ** 2)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7647eac>}
nname: 0
n 0(None)[pygui_globs['menustack'].toggle()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7647e6c>}
nname: 42
n 42(None)[sel.execute()
return True
]:
	i: 33(), 41()
	o: 

nname: 41
n 41(None)[]:
	i: 0(f)
	o: 42()

nname: 33
n 33(None)[return True
]:
	i: 0(t)
	o: 42()

nname: 0
n 0(sel is None)[sel = self.player.get_item_list(list_name).selected
]:
	i: 
	o: 33(t), 41(f)

nname: 0
n 0(None)[sel = self.player.get_item_list(list_name).selected
if sel is None:
	return True
sel.execute()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb764d0ec>}
nname: 0
n 0(None)[pygui_globs['menustack'].back_one_menu()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7647f6c>}
nname: 6
n 6(None)[__doc__ = ' Generic EvendHandler for Menus and Navigators '
def event_DEFAULT(self, event):
	return False

def _move(self, val):
	ret = self.player.select(val)
	if ret:
		if not(val < 0 and 'event_up'):
			pass
		louie_send('event_down', sender=self.player)
	else:
		if not(val < 0 and 'rebound_up'):
			pass
		louie_send('rebound_down', sender=self.player)
	return True

def event_up(self, event):
	return self._move(-event.arg['count'])

def event_down(self, event):
	return self._move(event.arg['count'])

def event_wheel_rwd(self, event):
	return self._move(-event.arg['count'] ** 2)

def event_wheel_fwd(self, event):
	return self._move(event.arg['count'] ** 2)

def event_toggle_menu(self, event):
	pygui_globs['menustack'].toggle()
	return True

def event_select(self, event, list_name='main_list'):
	sel = self.player.get_item_list(list_name).selected
	if sel is None:
		return True
	sel.execute()
	return True

event_right = event_select
def event_left(self, event):
	pygui_globs['menustack'].back_one_menu()
	return True

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb764794c>}
nname: 0
n 0(None)[from __future__ import absolute_import
from pygui.eventmanager import EventDispatcher
from pygui.shared import pygui_globs
from peewee.messages import send as louie_send
import pygui.config as config
class MenuEventHandler(EventDispatcher):
	__doc__ = ' Generic EvendHandler for Menus and Navigators '
	def event_DEFAULT(self, event):
		return False

	def _move(self, val):
		ret = self.player.select(val)
		if ret:
			if not(val < 0 and 'event_up'):
				pass
			louie_send('event_down', sender=self.player)
		else:
			if not(val < 0 and 'rebound_up'):
				pass
			louie_send('rebound_down', sender=self.player)
		return True

	def event_up(self, event):
		return self._move(-event.arg['count'])

	def event_down(self, event):
		return self._move(event.arg['count'])

	def event_wheel_rwd(self, event):
		return self._move(-event.arg['count'] ** 2)

	def event_wheel_fwd(self, event):
		return self._move(event.arg['count'] ** 2)

	def event_toggle_menu(self, event):
		pygui_globs['menustack'].toggle()
		return True

	def event_select(self, event, list_name='main_list'):
		sel = self.player.get_item_list(list_name).selected
		if sel is None:
			return True
		sel.execute()
		return True

	event_right = event_select
	def event_left(self, event):
		pygui_globs['menustack'].back_one_menu()
		return True



]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7640c2c>}
from __future__ import absolute_import
from pygui.eventmanager import EventDispatcher
from pygui.shared import pygui_globs
from peewee.messages import send as louie_send
import pygui.config as config
class MenuEventHandler(EventDispatcher):
	__doc__ = ' Generic EvendHandler for Menus and Navigators '
	def event_DEFAULT(self, event):
		return False

	def _move(self, val):
		ret = self.player.select(val)
		if ret:
			if not(val < 0 and 'event_up'):
				pass
			louie_send('event_down', sender=self.player)
		else:
			if not(val < 0 and 'rebound_up'):
				pass
			louie_send('rebound_down', sender=self.player)
		return True

	def event_up(self, event):
		return self._move(-event.arg['count'])

	def event_down(self, event):
		return self._move(event.arg['count'])

	def event_wheel_rwd(self, event):
		return self._move(-event.arg['count'] ** 2)

	def event_wheel_fwd(self, event):
		return self._move(event.arg['count'] ** 2)

	def event_toggle_menu(self, event):
		pygui_globs['menustack'].toggle()
		return True

	def event_select(self, event, list_name='main_list'):
		sel = self.player.get_item_list(list_name).selected
		if sel is None:
			return True
		sel.execute()
		return True

	event_right = event_select
	def event_left(self, event):
		pygui_globs['menustack'].back_one_menu()
		return True



